package com.ljtxxhwj.myblob.service;

import com.github.pagehelper.PageInfo;
import com.ljtxxhwj.myblob.entity.Article;
import com.ljtxxhwj.myblob.entity.ArticleKind;
import com.ljtxxhwj.myblob.entity.ArticleTag;
import com.ljtxxhwj.myblob.entity.Comment;
import com.ljtxxhwj.myblob.entity.ArticleWithTypeAndUname;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ArticleService {
    List<Article> getAll();

    boolean deleteOne(int id);
    boolean add(Article article);
    boolean modify(Article article);
    Article getOne(int articleId);
    Article readOne(int articleId);

    List<ArticleTag> getTag(int articleId);
    List<Comment> getComment(int articleId);
    List<Article> findAllArticle();

    boolean addComment(Comment comment);
    List<Article> findByTitle(String articleTitle);

    boolean deleteComment(int commentId);

    List<ArticleKind> getKind();

    PageInfo<ArticleWithTypeAndUname> loadWithPage(Integer currentPage, Integer pageSize);

    int deleteBatch(int id);

    void deleteByArticleId(Integer articleId);

    List<Article> getWant(Article article);

    int getTotalSeeByUserId(int userId);
    List<Article> getWantAndNew(Article article);
    List<Article> getArticlesByUserId(int userId);
}
